package cn.fbs.dao.oracle;

import cn.fbs.model.NewTCodeTargetType;
import cn.fbs.model.NewTcodeTargetTree;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OracleTargetMapper {


    List<NewTcodeTargetTree> getFirstLevel();


    List<NewTcodeTargetTree> getChildrens(@Param("length") int length, @Param("xh") String xh);

    void insert(NewTCodeTargetType targetType);

    void update(NewTCodeTargetType targetType);

    int selectCountByXH(@Param("length") int length, @Param("xh") String xh);

    void delete(@Param("xh") String xh);

    String getMaxTarget(@Param("xh") String xh, @Param("length") int length);

    List<NewTCodeTargetType> getTargetByMC(String mc);

    List<NewTCodeTargetType> selectAll();

    NewTCodeTargetType selectByPrimaryKey(String zbnm);

    String queryNameByXh(String xh);

    String selectIdByTargetName(String targetName);

    String getXh(@Param("zbnm") String zbnm);

    String getTargetByNm(@Param("zbnm") String zbnm);

    //找到当前目标下的所有子目标
    List<NewTCodeTargetType> getCurrentChildrens(@Param("xh") String xh);

    NewTCodeTargetType getByNm(String zbnm);
}
